perm filename TMP.TMP[MF,ALS] blob
sn#775754 filedate 1984-11-14 generic text, type C, neo UTF8
COMMENT ⊗ VALID 00002 PAGES
C REC PAGE DESCRIPTION
C00001 00001
C00002 00002
C00006 ENDMK
C⊗;
@ Before we get into the details of |do_page|, it is convenient to
consider a simpler routine that computes the first parameter of each
opcode.
@d four_cases(#)==#,#+1,#+2,#+3
@d eight_cases(#)==four_cases(#),four_cases(#+4)
@d sixteen_cases(#)==eight_cases(#),eight_cases(#+8)
@d thirty_two_cases(#)==sixteen_cases(#),sixteen_cases(#+16)
@d sixty_four_cases(#)==thirty_two_cases(#),thirty_two_cases(#+32)
@p function first_par(o:eight_bits):integer;
begin case o of
sixty_four_cases(set_char_0),sixty_four_cases(set_char_0+64):
first_par←o-set_char_0;
set1,put1,fnt1,xxx1,fnt_def1: first_par←get_byte;
set1+1,put1+1,fnt1+1,xxx1+1,fnt_def1+1: first_par←get_two_bytes;
set1+2,put1+2,fnt1+2,xxx1+2,fnt_def1+2: first_par←get_three_bytes;
right1,w1,x1,down1,y1,z1: first_par←signed_byte;
right1+1,w1+1,x1+1,down1+1,y1+1,z1+1: first_par←signed_pair;
right1+2,w1+2,x1+2,down1+2,y1+2,z1+2: first_par←signed_trio;
set1+3,set_rule,put1+3,put_rule,right1+3,w1+3,x1+3,down1+3,y1+3,z1+3,
fnt1+3,xxx1+3,fnt_def1+3: first_par←signed_quad;
nop,bop,eop,push,pop,pre,post,post_post,undefined_commands: first_par←0;
w0: first_par←w;
x0: first_par←x;
y0: first_par←y;
z0: first_par←z;
sixty_four_cases(fnt_num_0): first_par←o-fnt_num_0;
end;
end;
@ Before we get into the details of |do_char|, it is convenient to
consider a simpler routine that computes the first parameter of each
opcode.
@d three_cases(#)==#,#+1,#+2
@d four_cases(#)==#,#+1,#+2,#+3
@d eight_cases(#)==four_cases(#),four_cases(#+4)
@d nine_cases(#)==eight_cases(#),#+8
@d sixteen_cases(#)==eight_cases(#),eight_cases(#+8)
@d nineteen_cases(#)==nine_cases(#),nine_cases(#+9),#+18
@d thirty_two_cases(#)==sixteen_cases(#),sixteen_cases(#+16)
@d sixty_four_cases(#)==thirty_two_cases(#),thirty_two_cases(#+32)
@d eighty_three_cases(#)==sixty_four_cases(#),nineteen_cases(#+64)
@p function first_gf_par(o:eight_bits):integer;
begin case o of
sixty_four_cases(paint_0): first_gf_par←o-paint_0;
paint1,skip1,char_loc,gf_xxx1: first_gf_par←get_gf_byte;
paint1+1,skip1+1,gf_xxx1+1: first_gf_par←get_gf_two_bytes;
paint1+2,skip1+2,gf_xxx1+2: first_gf_par←get_gf_three_bytes;
new_row,gf_xxx1+3,yyy: first_gf_par←gf_signed_quad;
gf_nop,boc,eoc,gf_pre,gf_post,gf_post_post,undefined_commands: first_gf_par←0;
eighty_three_cases(left_z_83), right_z_0,
eighty_three_cases(right_z_1): first_gf_par←o-right_z_0;
end;
end;